﻿using NopSolutions.NopCommerce.BusinessLogic.Infrastructure;
using NopSolutions.NopCommerce.BusinessLogic.Services;

namespace NopSolutions.NopCommerce.BusinessLogic.Model
{
    public partial class Bundle : BaseEntity
    {
        public int ProductId { get; set; }
        public int ProductVariantId { get; set; }
        public int Quantity { get; set; }
        public int Order { get; set; }

        public Product Product { get { return IoC.Resolve<IProductService>().GetProductById(ProductId); } }
        public ProductVariant ProductVariant { get { return IoC.Resolve<IProductService>().GetProductVariantById(ProductVariantId); } }

        public virtual Product NpProduct { get; set; }
        public virtual ProductVariant NpProductVariant { get; set; }
    }
}
